﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PPTHelper
{
    public partial class Form4cfg : Form
    {
        public Form4cfg()
        {
            InitializeComponent();
            dateTimePicker1.MouseDown+=(o,e)=> Win32Api.Control_MouseDown(this.Handle);
        }

        const double minutes = 20; //默认20分
        public TimeSpan TimeSpan
        {
            set => dateTimePicker1.Value = value.Ticks == 0 
                ? DateTime.Now.Date.AddMinutes(minutes) 
                : DateTime.Now.Date.AddTicks(value.Ticks);
            get => dateTimePicker1.Value.TimeOfDay;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
